package com.ht.pms.core.dto.send;

import lombok.Data;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.stereotype.Component;

import java.io.Serializable;

/**
 * @Auther: 喻尊龙
 * @Date: 2018/10/19 12:03
 * @Description:
 */
@Data
@Component
@ConfigurationProperties(prefix = "pms")
public class ContactPerson implements Serializable {

    private String fcContact;
    private String tdContact;
    private String lsContact;
    private String zcContact;
    private String htContact;
    private String zqContact;
    private String cqContact;
    private String otherInfo;

    /**
     *
     * @param sendType
     * @param companyType 1 志成   2天大   3 联盛   4 富成   5 鸿特  6 志勤
     * @return
     */
    public String getContractName(Integer sendType,Integer companyType){
        switch (companyType){
            case 1:
                if(sendType==1){
                    return zcContact;
                }else {
                    return htContact;
                }
            case 2:
                if(sendType==1){
                    return tdContact;
                }else {
                    return htContact;
                }
            case 3:
                if(sendType==1){
                    return lsContact;
                }else {
                    return htContact;
                }
            case 4:
                if(sendType==1){
                    return fcContact;
                }else {
                    return htContact;
                }
            case 5:
                    return htContact;
            case 6:
                if(sendType==1){
                    return zqContact;
                }else {
                    return htContact;
                }
            case 7:
                if(sendType==1){
                    return cqContact;
                }else {
                    return htContact;
                }
            default:
                return htContact;
        }
    }

}
